@extends('admin.layouts.app')
@section('content')

                        <!-- Page-Title -->
                       
                        
                        <div class="row">
                        	<div class="col-lg-12">
                        		<div class="card-box">
                            <h2 class="m-t-0 header-title">Edit Car Type</h2>
                            <hr/>
                             
                              @include('admin.common.error')
                        			<div class="row">
			                        	<div class="col-md-6">
                                  <form class="form-horizontal" role="form" action="{{url('zadmin/routes/'.$data->id)}}" method="post">{{ method_field('PUT') }}

                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">Name</label>
                                                  <div class="col-md-10">
                                                      <input type="text" class="form-control" name="name" required="" value="{{$data->name}}" >
                                                  </div>
                                              </div>

                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">Type</label>
                                                  <div class="col-md-10">
                                                      <input type="text" class="form-control" name="type" required="" value="{{$data->type}}" >
                                                  </div>
                                              </div>

                                              <div class="form-group">
                                                  <label class="col-md-2 control-label">Coordinate</label>
                                                  <div class="col-md-10">
                                                      <table class="table">
                                                        @foreach($points as $p)
                                                        <tr>
                                                          <td>
    <input type="checkbox" value="{{$p->id}}" name="point_id[]" {{in_array($p->id,$point_ids)?'checked':''}} /></td>
                                                          <td>{{$p->name}}</td>
                                                          <td>{{$p->duration}}</td>
                                                        </tr>
                                                        @endforeach
                                                      </table>
                                                  </div>
                                              </div>
                                              

                                              

                                              <div class="form-group text-center">
                                                  
                                                  <button type="submit" class="btn btn-info waves-effect waves-light">Save</button>
                                              </div>
                                              
                                              
                             {{csrf_field()}}
                                          </form>
                                </div>
			                        	
			                        </div>

                             
			                        
                        			
                        		</div>
                                
                            </div> <!-- end col -->

                            
                        </div>
@endsection
                        
                        
                        

                  
            
    @section('modal')        
     
    @endsection        
       

           



    
        @section('js')

        
        @endsection
    
